package com.rayenterprise.kms.client.remote;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.rayenterprise.kms.domain.KHolder;

@RemoteServiceRelativePath("holderService")
public interface HolderRemote extends RemoteService {
	
	/**
	 * Utility class for simplifing access to the instance of async service.
	 */
	public static class Util {
		private static HolderRemoteAsync instance;
		public static HolderRemoteAsync getInstance(){
			if (instance == null) {
				instance = (HolderRemoteAsync) GWT.create(HolderRemote.class);
			}
			return instance;
		}
	}
	public KHolder getHolder(int holderId);
	public List<KHolder> getAll();
	public KHolder save(KHolder holder);
	public void deleteHolder(KHolder holder);

}
